package org.neuedu.chapter03_0611;

public class CycleDemo05 {
    public static void main(String[] args) {
        // 控制台 打印数字 1+2+3+.....+100 的和
        int i = 1;
        int sum = 0;
        while (i < 101) {
            sum = sum + i;
            i++;
        }
        System.out.println(sum);

        int sum2 = 0;
        for (int j = 1; j < 101; j++) {
            sum2 = sum2 + j;
        }
        System.out.println(sum2);
    }
}
